<extend name="Public/base" />

<block name="body">
    <div class="main-title">
        <h2>修改链接</h2>
    </div>
    <form action="{:U('')}" method="post" class="form-horizontal">
    <input type="hidden" class="form-control" name="id" id="id" value="{$res['id']}">
        <div class="form-item">
            <label class="item-label">标题<span class="check-tips">（链接标题）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="title" value="{$res['title']}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">网址<span class="check-tips">（网站首页地址）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="url" value="{$res['url']}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">描述<span class="check-tips">（相关网站描述）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="des" value="{$res['des']}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">状态<span class="check-tips">（显示或关闭）</span></label>
            <div class="controls">
            <if condition=" $res['status'] eq '1'">
                <input type="radio"name="status" value="1" checked/>显示
                <input type="radio"name="status" value="0">不显示
            <else/>
                <input type="radio"name="status" value="1" >显示
                <input type="radio"name="status" value="0" checked/>不显示
            </if>

            </div>
        </div>
        <div class="form-item">
            <label class="item-label">到期时间</label>
            <div class="controls">
                <input type="text" name="endtime" class="text input-large time" value="{$res['endtime']}" placeholder="请选择时间" />
            </div>
        </div>
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Link/index')}');

        $('.time').datetimepicker({
            format: 'yyyy-mm-dd hh:ii',
            language:"zh-CN",
            minView:2,
            autoclose:true
        });
        showTab();

    </script>
</block>